import { defHttp } from "@/utils/http/axios"

export const getTableData = (params) => {
    return new Promise(resolve => {
        let data = [
            {
                date: '2016-05-03',
                name: 'Tom',
                address: 'No. 189, Grove St, Los Angeles',
            },
            {
                date: '2016-05-02',
                name: 'Tom',
                address: 'No. 189, Grove St, Los Angeles',
            },
            {
                date: '2016-05-04',
                name: 'Tom',
                address: 'No. 189, Grove St, Los Angeles',
            },
            {
                date: '2016-05-01',
                name: 'Tom',
                address: 'No. 189, Grove St, Los Angeles',
            },
        ]
        setTimeout(() => {
            resolve({
                page: params.page,
                size: params.size,
                total: 1,
                count: 4,
                data,
            })
        }, 1000)
    })
    return defHttp.get({
        url: "/tableData",
        params,
    })
}
